package com.jeesite.modules.rt.entity;

import javax.validation.constraints.Size;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 轮播图Entity
 * @author 李寒冰
 * @version 2024-11-20
 */
@Table(name="rt_banner", alias="a", label="轮播图信息", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="pic", attrName="pic", label="图片"),
		@Column(name="content", attrName="content", label="图文"),
		@Column(name="create_time", attrName="createTime", label="时间", isUpdateForce=true),
		@Column(name="is_down", attrName="isDown", label="是否下载 0否  1是"),
		@Column(name="title", attrName="title", label="标题", queryType=QueryType.LIKE),
		@Column(name="url", attrName="url", label="下载链接"),
		@Column(name="type", attrName="type", label="1设备页  2首页"),
		@Column(name="anniu_text", attrName="anniuText", label="按钮文字"),
		@Column(name="anniu_url", attrName="anniuUrl", label="按钮跳转链接"),
		@Column(name="to_url", attrName="toUrl", label="跳转链接"),
	}, orderBy="a.id DESC"
)
public class RtBanner extends DataEntity<RtBanner> {
	
	private static final long serialVersionUID = 1L;
	private String pic;		// 图片
	private String content;		// 图文
	private Date createTime;		// 时间
	private String title;		// 标题

	private String isDown;
	private String url;
	private String type;
	private String anniuText;
	private String anniuUrl;
	private String toUrl;

	public String getToUrl() {
		return toUrl;
	}

	public void setToUrl(String toUrl) {
		this.toUrl = toUrl;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getAnniuText() {
		return anniuText;
	}

	public void setAnniuText(String anniuText) {
		this.anniuText = anniuText;
	}

	public String getAnniuUrl() {
		return anniuUrl;
	}

	public void setAnniuUrl(String anniuUrl) {
		this.anniuUrl = anniuUrl;
	}

	public String getIsDown() {
		return isDown;
	}

	public void setIsDown(String isDown) {
		this.isDown = isDown;
	}

	public RtBanner() {
		this(null);
	}
	
	public RtBanner(String id){
		super(id);
	}
	
	@Size(min=0, max=255, message="图片长度不能超过 255 个字符")
	public String getPic() {
		return pic;
	}

	public void setPic(String pic) {
		this.pic = pic;
	}
	
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	@Size(min=0, max=255, message="标题长度不能超过 255 个字符")
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}
	
}